// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import store from './store'
import '@/assets/css/base.css'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/element/index.css'
import '@/assets/css/icon/iconfont.css'
import {
  Button,
  ButtonGroup,
  Menu,
  Upload,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Input,
  InputNumber,
  Message,
  Form,
  Select,
  FormItem,
  Option,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxGroup,
  Pagination,
  Table,
  TableColumn,
  DatePicker,
  MessageBox,
  Icon,
  Row,
  Col,
  Cascader,
  Dialog,
  Breadcrumb,
  BreadcrumbItem,
  Loading
} from 'element-ui'
// import VueSocketio from 'vue-socket.io'
// import socketio from 'socket.io-client'
// Vue.use(new VueSocketio({
//   connection: socketio('ws://172.16.110.166:8888')
// }))
import VueLazyload from 'vue-lazyload'
const aa = require('./assets/1.jpg')
// Vue.use(VueLazyload)
Vue.use(VueLazyload, {
  error: aa,
  loading: 'https://tage-1258294351.cos.ap-shanghai.myqcloud.com/avatar/timg.jpg'
})
Vue.use(Cascader)
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Input)
Vue.use(InputNumber)
Vue.use(Upload)
Vue.use(Form)
Vue.use(Select)
Vue.use(FormItem)
Vue.use(Option)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Pagination)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(DatePicker)
Vue.use(Icon)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Row)
Vue.use(Col)
Vue.use(Dialog)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)

Vue.prototype.$loading = Loading.service
Vue.prototype.$msgbox = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$message = Message
Vue.prototype.$http = axios

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
